package first.endtoend

import first.endtoend.tsm.AgentMobilePhone

/**
 * Created with IntelliJ IDEA.
 * User: Olfa
 */

class Agent extends User
{

    static hasMany = [traces: Trace]
    static hasOne = [fps: FairPricesShop, workPhone: AgentMobilePhone]
    String regId // to identify the registred device to GCM
    Boolean sessionIsActive

    static constraints = {
        fps(nullable: true)
        id(unique: 'regId')
        regId(nullable: true)
        sessionIsActive(nullable: true)
        workPhone(nullable: true)
    }

    public String toString()
    {
        return firstName + " " + lastName
    }


}
